package com.seeyon.apps.ddkk.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.seeyon.cap4.form.bean.FormBean;
import com.seeyon.ctp.common.content.affair.constants.StateEnum;
import com.seeyon.ctp.common.exceptions.BusinessException;
import com.seeyon.ctp.common.po.affair.CtpAffair;
import com.seeyon.ctp.util.FlipInfo;

public interface QiangsDao {
	
	/**
	 * 获取指定人员指定表单的待办流程
	 * @param memberId
	 * @param formId
	 * @param state
	 * @return
	 * @throws BusinessException
	 */
	public List<Map> getAffairListByMemberIdAndState(Long memberId, List<Long> formIds, StateEnum state) throws BusinessException;
	/**
	 * 获取承诺函状态
	 * @param formBean
	 * @param param
	 * @return
	 */
	public Date validateLetterState(FormBean formBean, Map param) throws BusinessException;
	
	/**
	 * 根据经销商ID获取对应流程中的DD专员
	 * @param id
	 * @return
	 * @throws BusinessException
	 */
	public Long getDDAttacheByAgent(FormBean formBean, Long id) throws BusinessException;
	
	/**
	 * 根据名称获取sims中的经销商数据
	 * @param formBean
	 * @param name
	 * @return
	 * @throws BusinessException
	 */
	public List<Map> getSimsByMap(FormBean simsBean, Map params) throws BusinessException;
	
	/**
	 * 检查已发流程超过12月
	 * @param simsBean
	 * @param params
	 * @return
	 * @throws BusinessException
	 */
	public Date getRecentMonth(FormBean simsBean, Map params) throws BusinessException;
	
	/**
	 * 校验经销商是否在流程中
	 * @param formBean
	 * @param param
	 * @return
	 * @throws BusinessException
	 */
	public boolean checkAgentNotInFlow(FormBean formBean, Map param) throws BusinessException;
	
	/**
	 * 通过产品线名称获取产品线缩写
	 * @param simsBean
	 * @param name
	 * @return
	 * @throws BusinessException
	 */
	public String getProductAbridge(FormBean formBean, String name) throws BusinessException;
	
	/**
	 * 更新关键人员状态
	 * @param list
	 * @throws BusinessException
	 */
	public void updateAgentStatus(Map params) throws BusinessException;
	
	/**
	 * sims经销商状态校验
	 * @return
	 * @throws BusinessException
	 */
	public List<Map> checkAgentInSims(FormBean formBean, Map param) throws BusinessException;
	
	/**
	 * 合规问题校验
	 * @param formBean
	 * @param param
	 * @return
	 * @throws BusinessException
	 */
	public boolean isCompliance(FormBean formBean, Map param) throws BusinessException;

	/**
	 * 根据经销商编号查询数据
	 * @param formBean
	 * @param param
	 * @return
	 * @throws BusinessException
	 */
	public  Map<String,Object> findByNo(FormBean formBean, Map param) throws BusinessException ;
	
	/**
	 * 获取节点日志列表
	 * @param params
	 * @param flipInfo
	 * @return
	 * @throws BusinessException
	 */
	public FlipInfo findLogList(Date date, FormBean formBean, FlipInfo flipInfo) throws BusinessException;
}
